<?php
$this->title = '采购订单打印';
/** @var $model \common\models\c2\entity\InventoryReceiptNote */
?>
<style>
    .tc {
        text-align: center
    }
</style>
<div class="container-fluid">
    <div class="tc">
        <h2 style="font-size: 30px;">中山市祥丰（帕奇）家居用品有限公司</h2>
        <h2 style="font-size: 20px;">ZHONG SHAN XIANG FENG HOUSEWARE (PA QI)Co.,LTD</h2>
        <h5 style="font-size: 18px;">采购订单</h5>
    </div>

    <div class="row">
        <div class="col">订单编号：<?= $model->code ?></div>
        <div class="col">ISO标号：</div>
        <div class="col">订购日期：<?= date('Y-m-d', strtotime($model->occurrence_date)) ?></div>
        <div class="col">交货日期：<?= date('Y-m-d', strtotime($model->arrival_date)) ?></div>
    </div>
    <div class="row">
        <div class="col">厂商名称：<?= $model->supplier->name ?></div>
        <div class="col">联系人：<?= $model->supplier->label ?></div>
        <div class="col">传真：<?= $model->supplier->fax ?></div>
        <div class="col">联系电话：<?= $model->supplier->mobile_number ?></div>
    </div>

    <div class="row">
        <!--    <div class="col-xs-3">订购日期：</div>-->
        <div class="col">地址：<?= strip_tags($model->supplier->description) ?></div>
        <div class="col">部门：<?= $model->dept_manager_name ?></div>
        <div class="col">经手人：<?= $model->financial_name ?></div>
    </div>

    <table class="table table-bordered mt10">

        <tr class="tc">
            <td>料号</td>
            <td>品名</td>
            <td>数量</td>
            <td>单位</td>
            <td>价格</td>
            <td>金额</td>
            <td>备注</td>
        </tr>

        <?php
        $noteItems = $model->getNoteItems()->with('product', 'measure')->all() ?>

        <?php foreach ($noteItems as $item): ?>
            <tr class="tc">
                <td><?= $item->product->label ?></td>
                <td><?= $item->product->name ?></td>
                <td><?= $item->number ?></td>
                <td><?= !is_null($item->measure) ? $item->measure->name : '' ?></td>
                <td><?= $item->price ?></td>
                <td><?= $item->subtotal ?></td>
                <td><?= $item->memo ?></td>
            </tr>

        <?php endforeach; ?>

    </table>

    <div class="container-fluid">
        <p>备注：<?= $model->memo ?></p>
    </div>

</div>









